package com.atguigu.tingshu.album.client.impl;


import com.atguigu.tingshu.album.client.AlbumInfoFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.AlbumInfo;
import com.atguigu.tingshu.vo.album.AlbumStatVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AlbumInfoDegradeFeignClient implements AlbumInfoFeignClient {

    /**
     * 当openFeign接口调用失败会降级执行该实现类
     * @param id
     * @return
     */
    @Override
    public Result<AlbumInfo> getAlbumInfoById(Long id) {
        log.info("AlbumInfoDegradeFeignClient...getAlbumInfoById...执行了");
        return Result.fail();
    }

    @Override
    public Result<AlbumStatVo> findAlbumStatByAlbumId(Long albumId) {
        log.info("AlbumInfoDegradeFeignClient...findAlbumStatByAlbumId...执行了");
        return Result.fail();
    }
}
